package com.kws.merchant.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.kws.merchant.domain.OperationTicket;
import com.kws.merchant.domain.po.*;
import com.kws.merchant.domain.vo.WorkTickVo;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;

/**
 * 运维-两票管理(OperationTicket)表服务接口
 *
 * @author yxy
 * @since 2024-10-28 08:54:05
 */
public interface OperationTicketService extends IService<OperationTicket> {

    /**
     * 分页查询列表
     */
    Page<OperationTicket> pageList(TicketPo ticketPo);

    /**
     * 新增工作票
     * @param workPo
     * @return
     */
    Object addWorkTicket(WorkPo workPo);

    /**
     * 新增操作票
     * @param handlePo
     * @return
     */
    Object addHandleTicket(HandlePo handlePo);

    /**
     * 数据统计
     * @param dept
     * @param startTime
     * @param endTime
     * @return
     */
    WorkTickVo statistics(String dept, String startTime, String endTime);

    OperationTicket detailById(Long id);

    /**
     * 上传两票文件
     * @return
     */
    Object uploadTickFile(TickFilePo tickFilePo);

    /**
     * 下载两票文件
     * @param id
     * @return
     */
    Object downloadTickFile(Long id, HttpServletResponse response);

    /**
     * 操作-上传文件-改变状态为已处理
     * @param tickFilePo
     * @return
     */
    Object uploadFile(TicketStatus tickFilePo);

    /**
     * 根据两票id作废两票
     * @param id
     * @return
     */
    Object cancellation(Long id);
}
